/**
 * Create by yxk at 2020/6/15
 */
import request from '@/utils/request'

/**
 * 付款单新建/编辑
 */
export function jxcPaymentAddOrUpdateAPI(data, isUpdate = false) {
  return request({
    url: 'jxcPayment/addOrUpdate' + (isUpdate ? '/update' : '/add'),
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 付款单详情
 */
export function jxcPaymentQueryByIdAPI(data) {
  return request({
    url: `jxcPayment/queryById/${data.label}`,
    method: 'post',
    data: data
  })
}

/**
 * 删除付款单
 */
export function jxcPaymentDeleteByIdsAPI(data) {
  return request({
    url: 'jxcPayment/deleteByIds',
    method: 'post',
    data: data
  })
}

/**
 * 付款单作废
 */
export function jxcPaymentSetStateByIdsAPI(data) {
  return request({
    url: 'jxcPayment/setStateByIds',
    method: 'post',
    data: data
  })
}
